<@override name="title">礼品信息</@override>

<@override name="viewbody">
<div class="row">
    <div class="col-md-12">
        <h3 class="page-title">
            礼品信息
            <small>礼品信息列表</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/admin/home">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">礼品信息</a>
            </li>
        </ul>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>礼品一览表
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <div class="btn-group">
                        <a id="sample_editable_1_new" href="${ctx}/admin/gift/gift/create" class="btn default green-stripe">
                            新增 <i class="fa fa-plus"></i>
                        </a>
                        <a id="sample_editable_1_new" class="btn default yellow-stripe batchdelete" data-action="${ctx}/admin/gift/gift/remove"
                           data-tables="#gift-list" data-message="您确认删除所选择的礼品信息么？">
                            删除 <i class="fa fa-ban"></i>
                        </a>
                        <a id="sample_editable_1_new" class="btn default red-stripe batchstop" data-action="${ctx}/admin/gift/gift/stop"
                           data-tables="#gift-list" data-message="你确定要停用所选择的礼品吗？">
                            停用 <i class="fa fa-ban"></i>
                        </a>
                    </div>

                </div>
                <table class="table table-striped table-bordered table-hover" id="gift-list">
                    <thead>
                    <tr>
                        <th width="30"><input type="checkbox" name="checkall"></th>
                        <th width="30">序号</th>
                        <th width="130">礼品编号</th>
                        <th>礼品名称</th>
                        <th width="15%">礼品封面</th>
                        <th width="10%">开始时间</th>
                        <th width="10%">结束时间</th>
                        <th width="5%">礼品库存</th>
                        <th width="5%">所需积分</th>
                        <th width="8%">状态</th>
                        <th width="8%" class="text-center">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script id="pricute_template" type="text/x-handlebars-template">
    {{#if cover}}
    <a href="${ctx}{{cover}}" class="thumbnail fancybox-button" data-rel="fancybox-button">
        <img class="" src="${ctx}{{portfolio}}" alt="">
    </a>
    {{else}}
    暂无图片
    {{/if}}
</script>
<script id="action_template" type="text/x-handlebars-template">

    <div class="table-controls">
        <a href="${ctx}/admin/gift/gift/edit/{{id}}" class="btn default blue-stripe" title="编辑"><i
                class="fa fa-edit"></i></a>
        <a href="javascript:void(0);" class="btn default yellow-stripe" title="删除"
           data-hook="remove-action" data-action="${ctx}/admin/gift/gift/remove?DATA={{id}}">
            <i class="fa fa-trash-o"></i></a>

        {{#if status}}
        <a href="javascript:void(0);" class="btn default red-stripe" title="停用"
           data-hook="stop-action" data-message="你确定要停用该问题吗" data-action="${ctx}/admin/gift/gift/stop?DATA={{id}}">
            <i class="fa fa-eye-slash"></i></a>
        {{else}}
        <a href="javascript:void(0);" class="btn default red-stripe" title="启用"
           data-hook="stop-action" data-message="你确定要启用该问题吗" data-action="${ctx}/admin/gift/gift/start?DATA={{id}}">
            <i class="fa fa-eye"></i></a>
        {{/if}}

    </div>
</script>
</@override>
<@override name="viewmodule">basic_gift_index</@override>
<@extends name="../../_basic/main.ftl"></@extends>
